import Vue from 'vue'
import {
  Button,
  Form,
  Input,
  FormItem,
  Message,
  Container,
  Aside,
  Header,
  Main,
  Col,
  Menu,
  Submenu,
  MenuItemGroup,
  MenuItem,
  Breadcrumb,
  BreadcrumbItem,
  Row,
  Avatar,
  Table,
  TableColumn,
  Switch,
  Pagination,
  Dialog,
  DatePicker,
  TimePicker,
  Radio,
  TimeSelect,
  Option,
  Select,
  Checkbox,
  MessageBox,
  Steps,
  Step,
  Tag,
  CascaderPanel,
  CheckboxGroup,
  Upload,
  TabPane,
  Cascader
} from 'element-ui'

Vue.use(Button)
Vue.use(Upload)
Vue.use(TabPane)
Vue.use(Avatar)
Vue.use(Dialog)
Vue.use(Checkbox)
Vue.use(Tag)
Vue.use(CascaderPanel)
Vue.use(Steps).use(Step)
Vue.use(CheckboxGroup)

Vue.use(Form)
  .use(Input)
  .use(FormItem)
Vue.use(Container)
  .use(Aside)
  .use(Header)
  .use(Main)
Vue.use(Col)
  .use(Menu)
  .use(Submenu)
  .use(MenuItemGroup)
  .use(MenuItem)
Vue.use(Breadcrumb).use(BreadcrumbItem)
Vue.use(Row)
Vue.use(Table).use(TableColumn)
Vue.use(Switch)
Vue.use(Pagination)
Vue.use(DatePicker).use(TimePicker)
Vue.use(Radio)
Vue.use(TimeSelect)
Vue.use(Option).use(Select)
Vue.use(Cascader)
Vue.prototype.$message = Message
Vue.prototype.$Toast = function success(msg, tpe) {
  this.$message({
    message: msg,
    type: tpe
  })
}

Vue.prototype.$confirm = MessageBox.confirm
